package com.semp.jadoma.core.service;

import java.util.List;

import com.semp.jadoma.core.dao.GalleryObjectDAO;
import com.semp.jadoma.core.model.GalleryObject;

public class GalleryService {

	private final static GalleryService instance = new GalleryService();
	
	private GalleryService() {}
	
	public static GalleryService getInstance() {
		return instance;
	}
	
	public static GalleryObject createObject(GalleryObject object) {
		GalleryObjectDAO.update(object);
		return object;
	}
	
	public final static Long countObjectsByExternalId(long externalId) {
		return GalleryObjectDAO.countByExternalId(externalId);
	}
	
	public final static List findObjectsByExternalIdLimit(Long externalId, int offsett, int maxResults) {
		return GalleryObjectDAO.findByExternalIdLimit(externalId, offsett, maxResults);
	}
	
}
